import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import Phone from '@/components/Phone'
import Computer from '@/components/Computer'


Vue.use(Router)

export default new Router({
  routes: [
    // {
    //   path: '/',
    //   name: 'HelloWorld',
    //   component: HelloWorld
    // },
    {
      path: '/phone/:id',//设置参数
      name: 'Phone',
      component: Phone
    },
    {
      path: '/computer',
      name: 'Computer',
      component: Computer
    }
  ]
})
